refactor: clean up dialog-model.tsx per code review#12983
Merged
Conversation
- Extract duplicated favorite/recent option builder into toOptions helper - Simplify showExtra memo to single boolean expression - Simplify title memo with optional chaining - Remove dead ref signal and unused DialogSelectRef import - Inline intermediate variables (q, value aliases) - Use implicit returns in map callbacks
ccf8a50 to
6481f67
Compare
BryceRyan
pushed a commit
to BryceRyan/opencode
that referenced
this pull request
Feb 10, 2026
3 tasks
relaxkeren
pushed a commit
to relaxkeren/opencode
that referenced
this pull request
Feb 15, 2026
schneiderlo
pushed a commit
to schneiderlo/opencode
that referenced
this pull request
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toOptionshelper (~30 lines of duplication removed)showExtramemo from branching pattern to single boolean expressiontitlememo with optional chaining, removing double memo call and!assertionrefsignal and unusedDialogSelectRefimportq,valuealiases) per style guide